﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Sec_scan安全漏洞扫描系统_2._0.HomeForm
{
    public partial class Proxy : Form
    {
        public Proxy()
        {
            InitializeComponent();
            StartPosition = FormStartPosition.CenterScreen;
        }

        private void Proxy_Load(object sender, EventArgs e)
        {

        }

        private void button2_Click(object sender, EventArgs e)
        {
            if(string.IsNullOrEmpty(textBox1.Text) || string.IsNullOrEmpty(textBox2.Text) || string.IsNullOrEmpty(textBox3.Text) || string.IsNullOrEmpty(textBox4.Text))
            {
                MessageBox.Show("代理信息不能为空！");
             }
            else
            {

            }
        }

        private void button3_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(textBox8.Text) || string.IsNullOrEmpty(textBox7.Text) || string.IsNullOrEmpty(textBox6.Text) || string.IsNullOrEmpty(textBox5.Text))
            {
                MessageBox.Show("代理信息不能为空！");
            }
            else
            {

            }
        }
        /// <summary>
        /// socks5代理验证
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            if(string.IsNullOrEmpty(textBox1.Text) || string.IsNullOrEmpty(textBox2.Text))
            {
                MessageBox.Show("代理信息不能为空！");
            }
            else
            {
                // 验证socks5代理信息
                string ip = textBox1.Text;
                string port = textBox2.Text;
                // 加百度地址进行访问验证
                string baidu = "https://www.baidu.com";
                // 加谷歌地址进行访问验证
                string google = "https://www.google.com";
                if(string.IsNullOrEmpty(textBox3.Text) || string.IsNullOrEmpty(textBox4.Text))
                {
                    // 如果账号密码为空，不需要使用账号密码进行连接测试
                    
                }
                else
                {
                    // 使用账号密码进行验证

                }
            }
        }
        /// <summary>
        /// http代理验证
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>

        private void button4_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(textBox8.Text) || string.IsNullOrEmpty(textBox7.Text))
            {
                MessageBox.Show("代理信息不能为空！");
            }
            else
            {

            }
        }
    }
}
